<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<div class="easyui-layout" fit="true">
  <div region="center" style="padding:0px;border:0px">
  <t:datagrid name="dictMajorList" checkbox="true" fitColumns="true"
  	 title="院部管理" actionUrl="dictCollegeController.do?datagrid" idField="id" fit="true" queryMode="group">
   <t:dgCol title="主键"  field="id"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="创建日期"  field="createDate" formatter="yyyy-MM-dd" hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="院部名称"  field="collegeName"   query="true" queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="是否删除"  field="deleted"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="院部编号"  field="code"    queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="院部简称"  field="shortName"   query="true" queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="简拼"  field="py"   query="true" queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="序号"  field="majorOrder"    queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="操作" field="opt" width="120"></t:dgCol>
     <t:dgFunOpt  funname="editItemDetail({'编辑'},{'dictCollegeController.do?goUpdate'},id,{'475'},{'270'})" title="编辑"  />
   <t:dgFunOpt  funname="showItemDetail({'查看'},{'dictCollegeController.do?goUpdate'},id,{'475'},{'270'})" title="查看"  /> 
   <t:dgDelOpt title="删除" url="dictCollegeController.do?doDel&id={id}" />
   <t:dgToolBar title="录入" icon="icon-add" url="dictCollegeController.do?goAdd" funname="add" height="270" width="475"></t:dgToolBar>
   <t:dgToolBar title="同步学院数据" icon="icon-put" funname="importData"></t:dgToolBar>
<%--     <t:dgToolBar title="批量删除"  icon="icon-remove" url="dictCollegeController.do?doBatchDel" funname="deleteALLSelect"></t:dgToolBar> --%>
    
  </t:datagrid>
  </div>
 </div>
  <script type="text/javascript"> 
  function importData(){
		
		ajaxLoading("正在导入数据请稍后...");
		
		$.ajax({
			url:"dictCollegeController.do?importData",
			success:function(data){
				data = $.parseJSON(data);
				tip(data.msg);
				
				ajaxLoadEnd();
				
				reloadTable();
			}
		});
	} 
 </script>